# filename: example8_17.py
# 计算跑道的造价，包括跑道本身和靠近游泳池一侧的围栏

import math


class Circle:
    def __init__(self, r):
        self.__radius = r
        self.__area = math.pi * self.__radius * self.__radius
        self.__perimeter = 2 * math.pi * self.__radius

    @property
    def radius(self):
        return self.__radius

    @radius.setter
    def radius(self, r):
        self.__radius = r
        self.__area = math.pi * self.__radius * self.__radius
        self.__perimeter = 2 * math.pi * self.__radius

    @property
    def area(self):
        return self.__area

    @property
    def perimeter(self):
        return self.__perimeter


rad = float(input("Please input the radius:"))
side = float(input("Please input the width of the road:"))
pool = Circle(rad)
poolside = Circle(rad + side)
cost = poolside.perimeter * 35 + (poolside.area - pool.area) * 20
print("The total cost is:{:.3f}".format(cost))
